/*
 * Label
 * 
 * initial implementation : 4.9.2007
 *
 * Copyright (c) Adam Sida, asida@centrum.cz.
 * All rights reserved.
 * 
 * for license see Petra.Gis.License.txt
 */
using System;
//using System.Collections.Generic;
//using System.Text;
using Petra.Gis.Geometry.Support;


namespace Petra.Gis.Geometry
{
  //public class Label : pointGeometryBase

  /// <summary>
  /// represents map label for human readable or printable maps
  /// this is Point geometry where text is rendered instead of point only
  /// </summary>
  public class Label : Point
  {
    private string _text;
    private NormalVector _normalVector; //used to flip text up side down ;-), very usefull feature ;-)
    private TextAlignmentType _textAlign;
    private TextEncodingType _encoding;

    public enum TextAlignmentType
    {
      CenterCenter = 0,
      CenterLeft   = 1,
      CenterRight  = 2,
      TopCenter    = 4,
      TopLeft      = 5,
      TopRight     = 6,
      BottomCenter = 8,
      BottomLeft   = 9,
      BottomRight  = 10
    }




    public enum TextEncodingType
    {
      RichText   = 0,
      WindowAnsi = 1,
      Unicode    = 2,
    }



    static Label()
    {

    }




    public Label()
    {
      NormalVector oNormalVector = new NormalVector(0, 0, 1);
    }




    public Label(double X, double Y, double Z, string mapText)
    {

      CoordinateList Coords = new CoordinateList(Dimension.dim3D, X, Y, Z);
      this.Origin = Coords;
      this.Text = mapText;
    }




    public Label(double X, double Y, double Z, string mapText, TextAlignmentType txtAlignment)
    {

      CoordinateList Coords = new CoordinateList(Dimension.dim3D, X, Y, Z);
      this.Origin = Coords;
      this.Text = mapText;
      this.TextAlignment = txtAlignment;
    }




    public string Text
    {
      get { return _text; }
      set { _text = value; }
    }




    public TextAlignmentType TextAlignment
    {
      get { return _textAlign;} set {_textAlign = value;}
    }




    public TextEncodingType TextEncoding
    {
      get { return _encoding; }
      set { _encoding = value; }
    }



    public NormalVector NormalVector
    {
      get { return _normalVector; }
      set { _normalVector = value; }
    }

  }
}
